﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true"
    CodeBehind="KtCommCodeType.aspx.cs" Inherits="Mang24k99.Web.COMM.KtCommCodeType"
    Title="代码类型参数维护" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <script type="text/javascript">
         function Cancel()
        {
            var result =confirm("刚才未保存的操作将会取消，你确定吗？");
            if(result)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    </script>
    <div>
        <asp:Panel ID="Panel1" runat="server">
        <asp:Button ID="btnBack" CssClass="form_btn" runat="server" Text="返回上一页" 
                onclick="btnBack_Click" />
            <table >
                <tr>
                    <td class="tb_title1">
                        类型编码：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtCode" runat="server"></asp:TextBox>
                    </td>
                    <td class="tb_title1">
                        类型名称：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1">
                        编码分类：
                    </td>
                    <td class="tb_txt1">
                        <asp:DropDownList ID="ddlSpec" runat="server">
                            <asp:ListItem Selected="True" Value="1">二维表</asp:ListItem>
                            <asp:ListItem Value="2">层次表</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td class="tb_title1">
                        是否有效：
                    </td>
                    <td class="tb_txt1">
                        <asp:DropDownList ID="ddlIsvalidate" runat="server">
                            <asp:ListItem Selected="True" Value="1">使用</asp:ListItem>
                            <asp:ListItem Value="0">禁用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1" valign="top">
                        备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtRemark" runat="server" Height="101px" TextMode="MultiLine" Style="float: left"
                            Width="178px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnSave" CssClass="form_btn" runat="server" Text="保存" 
                            onclick="btnSave_Click" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnCancel" CssClass="form_btn" runat="server" Text="取消" 
                            onclick="btnCancel_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server">
            <div>
                <asp:Button ID="btnAdd" CssClass="form_btn" runat="server" Text="新增" 
                    onclick="btnAdd_Click" />
            </div>
            <div>
                 <asp:GridView ID="grdList" runat="server" AutoGenerateColumns="False" Width="100%"
                     OnRowDeleting="grdList_RowDeleting"  onselectedindexchanged="grdList_SelectedIndexChanged">
                    <HeaderStyle CssClass="tb_title2" />
                    <RowStyle CssClass="tb_txt2" />
                   <Columns>
                        <asp:TemplateField HeaderText="序号">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ID" HeaderText="ID" Visible="true" />
                        <asp:BoundField DataField="TYPE_CODE" HeaderText="类型编码" />
                        <asp:BoundField DataField="TYPE_NAME" HeaderText="类型名称" />
                        <asp:TemplateField HeaderText="编码分类">
                            <ItemTemplate>
                                <asp:Label ID="labspec" runat="server" Text='<%#GetSpec((int)Eval("TYPE_SPEC"))%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="是否有效">
                            <ItemTemplate>
                                <asp:Label ID="lab" runat="server" Text='<%#GetStatus((int)Eval("IS_VALIDATE"))%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TYPE_REMARK" HeaderText="备注" />
                        <asp:ButtonField ButtonType="link" CommandName="Select" HeaderText="编辑" ShowHeader="True"
                            Text="编辑" />
                        <asp:CommandField DeleteText="&lt;div id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('删除该代码类型将同步删除该类型下所有公用代码参数，确定删除吗？')&quot;&gt;删除&lt;/div&gt; "
                           HeaderText="删除" ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </div>
            <div>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="8" FirstPageText="首页"
	                LastPageText="尾页" NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged"
	                PrevPageText="上一页" ShowInputBox="Always" SubmitButtonText="GO" AlwaysShow="True"
	                CssClass="AspNetPager" CustomInfoHTML="  共&lt;span class=&quot;AspNetPager_current&quot;&gt;{0}&lt;/span&gt;页"
	                CurrentPageButtonClass="AspNetPager_current" CustomInfoClass="" HorizontalAlign="Right"
	                InputBoxClass="AspNetPager_txt" SubmitButtonClass="AspNetPager_btn" CurrentPageButtonStyle="AspNetPager"
	                PagingButtonSpacing="1px" ShowCustomInfoSection="Right">
                </webdiyer:AspNetPager>
            </div>
        </asp:Panel>
    </div>
</asp:Content>
